Consider a Flight logical data base F1S
Here SPFLI,SFLIGHT,SBOOK are called as Nodes which are nothing but Tables.
A node can be a database table/data dictionary structure.
GET
Syntax : GET <nodename>.
GET event occurs(triggers) when the logical database has read a line from the node <nodename> and makes it available to the work area in the program declared using the statement NODES <nodename>.
GET LATE
Syntax : GET <nodename> LATE
GET LATE event is triggered when all of the data records for a node and all the data records of the sub-nodes under it in the hierarchy of the logical database have been read.
Example : (taken from help.sap.com)
Associate this report with logical database F1S in the Attributes section of the report.
REPORT ZGET_DEMO.
NODES: SPFLI, SFLIGHT, SBOOK.
DATA WEIGHT TYPE I VALUE 0.
START-OF-SELECTION.
WRITE 'Test Program for GET and GET LATE events demonstration'.
GET SPFLI.
SKIP.
WRITE: / 'Carrid:', SPFLI-CARRID,
'Connid:', SPFLI-CONNID,
/ 'From: ', SPFLI-CITYFROM,
'To: ', SPFLI-CITYTO.
ULINE.
GET SFLIGHT.
SKIP.
WRITE: / 'Date:', SFLIGHT-FLDATE.
GET SBOOK.
WEIGHT = WEIGHT + SBOOK-LUGGWEIGHT.
GET SFLIGHT LATE.
WRITE: / 'Total luggage weight =', WEIGHT.
ULINE.
WEIGHT = 0.
Explanation :
The total luggage weight is calculated for each flight and all it's passengers (booking id's) in the event GET SBOOK, and then displayed in the list and weight is reset in the event GET SFLIGHT LATE.
A node can be a database table/data dictionary structure.
GET
Syntax : GET <nodename>.
GET event occurs(triggers) when the logical database has read a line from the node <nodename> and makes it available to the work area in the program declared using the statement NODES <nodename>.
GET LATE
Syntax : GET <nodename> LATE
GET LATE event is triggered when all of the data records for a node and all the data records of the sub-nodes under it in the hierarchy of the logical database have been read.
Example : (taken from help.sap.com)
Associate this report with logical database F1S in the Attributes section of the report.
REPORT ZGET_DEMO.
NODES: SPFLI, SFLIGHT, SBOOK.
DATA WEIGHT TYPE I VALUE 0.
START-OF-SELECTION.
WRITE 'Test Program for GET and GET LATE events demonstration'.
GET SPFLI.
SKIP.
WRITE: / 'Carrid:', SPFLI-CARRID,
'Connid:', SPFLI-CONNID,
/ 'From: ', SPFLI-CITYFROM,
'To: ', SPFLI-CITYTO.
ULINE.
GET SFLIGHT.
SKIP.
WRITE: / 'Date:', SFLIGHT-FLDATE.
GET SBOOK.
WEIGHT = WEIGHT + SBOOK-LUGGWEIGHT.
GET SFLIGHT LATE.
WRITE: / 'Total luggage weight =', WEIGHT.
ULINE.
WEIGHT = 0.
Explanation :
The total luggage weight is calculated for each flight and all it's passengers (booking id's) in the event GET SBOOK, and then displayed in the list and weight is reset in the event GET SFLIGHT LATE.